<!-- 流程印章 -->
<template>
  <div class="flow-stamp-container">
    <img :style="style" src="@/assets/flowable/stamp/approved-new.svg" v-if="status == STATUS.APPROVED" />
    <img :style="style" src="@/assets/flowable/stamp/rejected-new.svg" v-else-if="status == STATUS.REJECTED" />
    <img :style="style" src="@/assets/flowable/stamp/underway-new.svg" v-else-if="status == STATUS.UNDERWAY" />
    <img :style="style" src="@/assets/flowable/stamp/canceled-new.svg" v-else-if="status == STATUS.CANCELLED" />
  </div>
</template>

<script setup>
import { computed } from "vue";
import { STATUS } from "@/components/flowable/flow/common/FlowConstant";

let props = defineProps({
  status: Number,
  size: { type: Number, default: 48 },
});

let style = computed(() => {
  return {
    width: props.size + "px",
    height: props.size + "px",
  };
});
</script>

<style lang="less" scoped>
.flow-stamp-container {
  img {
    overflow: hidden;
    background-color: transparent;
    z-index: 999;
  }
}
</style>
